home *** CD-ROM | disk | FTP | other *** search
/ isnet Internet / Isnet Internet CD.iso / prog / hiz / 09 / 09.exe / adynware.exe / perl / lib / site / URI / URL / wais.pm < prev    next >
Encoding:
Perl POD Document  |  1999-12-28  |  724 b   |  37 lines

  1. package URI::URL::wais;
  2. require URI::URL::_generic;
  3. @ISA = qw(URI::URL::_generic);
  4.  
  5. use URI::Escape;
  6.  
  7.  
  8.  
  9. sub default_port { 210 }
  10.  
  11. sub _parse {
  12.     my($self, $init) = @_;
  13.     $self->URI::URL::_generic::_parse($init, qw(netloc path query frag));
  14. }
  15.  
  16. sub _path_comp
  17. {
  18.     my $self = shift;
  19.     my $no   = shift;
  20.     my @p = $self->path_components;
  21.     shift(@p) if @p && $p[0] eq '';
  22.     my $old = $p[$no];
  23.     if (@_) {
  24.     $p[$no] = $_[0];
  25.     $self->path_components(@p);
  26.     }
  27.     $old;
  28. }
  29.  
  30. sub database { shift->_path_comp(0, @_); }
  31. sub wtype    { shift->_path_comp(1, @_); }
  32. sub wpath    { shift->_path_comp(2, @_); }
  33.  
  34. *params   = \&URI::URL::bad_method;
  35. *eparams  = \&URI::URL::bad_method;
  36. 1;
  37.